//115优化大师地址： https://greasyfork.org/zh-CN/scripts/408466
//115优化大师修改以下函数即可 
function originLink(pid, fid, type, name, i) { //视频真实地址
    return new Promise(function(resolve, reject) {
        if (type != '115origin' && (G.get('play_Quality') != '原码' || ((G.get('player') == 'Dplayer' && type == '115play') || type == 'Dp'))) {

            resolve([false, 'ignore']);
            return;
        };
        unsafeWindow.browserInterface.CreateDownloadTaskForMaster(pid,
        function(json) {
            if (json.state) {
                var link = json.data[fid].url.url;
                name ? resolve([link, name, i]) : resolve([link]);
            } else {
                if (name) {
                    resolve([false, name, i, json.msg]);
                } else {
                    resolve([false, json.msg]);
                };
            };
        });
    });
};